﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Expect.Core.Interfaces;

namespace Expect.Core.Fixtures
{
    /// <summary>
    /// Base class for column fixtures
    /// </summary>
    public abstract class ColumnFixture : TableFixture
    {
        /// <summary>
        /// Treat a table cell
        /// </summary>
        /// <param name="cell"></param>
        /// <param name="defName"></param>
        /// <returns></returns>
        protected override bool? ResolveCell(FixtureCell cell, string defName)
        {
            if (Context.NameProvider.IsAMethod(defName))
            {
                return ReflectionHelper.RunMethod(Context, this, cell, cell, defName, true, null);                
            }

            return base.ResolveCell(cell, defName);
        }
    }
}
